#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <string>
#include <list>
using namespace std;


template<typename T>

void Swap(T& a, T& b)
{
	T c = a;
	a = b;
	b = c;
}



int main()
{
	double a = 10.0, b = 20.0;
	Swap(a, b);

	//cout << a << endl;
	//cout << b << endl;


	string s1("hello world");

	string::iterator it1 = s1.begin();

	while (it1 != s1.end())
	{
		cout << *it1 << " ";
		it1++;
	}

	cout << endl;

	list<int> l1;

	l1.push_back(1);
	l1.push_back(2);
	l1.push_back(3);
	l1.push_back(4);
	l1.push_back(5);

	list<int>::iterator lt1 = l1.begin();

	for (auto e : l1)
	{
		cout << e << " ";
	}
	cout << endl;

	return 0;
}